package practice02;

import java.util.Arrays;
import java.util.Random;

public class ColorBall {
    public static void main(String[] args) {
        int[] a=new int[33];
        int[] b=new int[16];
        for(int i=0;i<33;i++){
            a[i]=i+1;
        }
        for(int i=0;i<16;i++){
            b[i]=i+1;
        }
        color1(a);
        color2(b);
//        System.out.println(Arrays.toString(a));
    }

    private static void color2(int[] b) {
        for (int i = 0; i < 16; i++) {
            int j = new Random().nextInt(16);
            int t = b[i];
            b[i] = b[j];
            b[j] = t;
        }
        int[] d=Arrays.copyOf(b,1);
        System.out.println("蓝球为："+Arrays.toString(d));
    }

    private static void color1(int[] a) {
        for (int i=0;i<33;i++){
            int j=new Random().nextInt(33);
            int t=a[i];
            a[i]=a[j];
            a[j]=t;
        }
        int[] c=Arrays.copyOf(a,6);
       System.out.println("红球为："+Arrays.toString(c));
        }




}
